<!--#include file="conn.asp"-->
<!--#include file="chkuser.asp"-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
*{ padding:0px; margin:0px; font-size:12px}
a{ color:#666666;}
a:hover{ color:#000000}
</style>

<SCRIPT language=javascript>
function check() 
{
	var strFileName=document.form1.FileName.value;
	var FileType;
	var ImgWH;
	if (strFileName=="")
	{
    	alert("请选择要上传的文件");
		document.form1.FileName.focus();
    	return false;
  	}
  	else
  	{
		FileType=strFileName.substr(strFileName.length-3)
		FileType=FileType.toLowerCase();
		if(FileType=="swf")
		{
			ImgWH=prompt("请输入FLASH文件的宽度和高度，中间用英文的逗号隔开：","500,350"); 
			if (ImgWH==null)
			{
				document.form1.ImgWidth.value=0;
				document.form1.ImgHeight.value=0;
				return false;
			}
			else
			{
				document.form1.ImgWidth.value=ImgWH.substr(0,ImgWH.indexOf(","));
				document.form1.ImgHeight.value=ImgWH.substr(ImgWH.indexOf(",")+1);
			}
		}
		document.form1.style.display='none';
		document.getElementById("progressBar").style.display='';
  	}
}
</SCRIPT>
</head>
<body>
<%
if EnableUploadFile_con=True then
	if session("SYSUserID")<>"" then
%>
	<form action="Upload_do_lt.asp?n=<%=request("n")%>&x=<%=request("x")%>" method="post" name="form1" onSubmit="return check()" enctype="multipart/form-data">
	  <input name="FileName" type="FILE" style="width:200px"><input type="submit" name="Submit" value="上传">
	  <input name="ImgWidth" type="hidden" id="ImgWidth">
	  <input name="ImgHeight" type="hidden" id="ImgHeight">
	  <input name="AlignType" type="hidden" id="AlignType">
	</form>
	<div  id="progressBar" style="display:none"><img src="images/progressBar.gif" border="0" align="absmiddle">上传中，请稍后...</div>
<%
    else
	response.Write("对不起，请先登入！")
    end if
else
	response.Write("上传功能已关闭，请先开启！")
end if
%>
</body>
</html>

